package cn.shopifymall.hw_od;

import java.util.Scanner;

/**
 * @Author 孤风雪影
 * @Email gitee.com/efairy520
 * @Date 2023/3/14 21:54
 * @Version 1.0
 */
public class HJ5 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String line = scanner.nextLine();
        String substring = line.substring(2);
        Integer integer = Integer.valueOf(substring, 16);
        System.out.println(integer);
    }
}
